module.exports = function($scope, $state, $stateParams, $modalInstance, $resource,$modal,FileUploader,toaster, apply_id, user_code, rule_type){
  $scope.info = {
    'apply_id' : apply_id,
    'user_code' : user_code,
    'rule_type' : rule_type,
    'actual_capital_money' : ''
  }
  $scope.actual_capital_money = '';
  $scope.ok = function(){
      $scope.info.actual_capital_money = $scope.actual_capital_money * 100;
      if (confirm('确定给该企业拨款该金额吗~~~?')){
          $resource('/api/ac/ggc/touristFundsCapitalApplyService/updateFinanceCapitalApplyOn', {}, {}).
          save($scope.info,function(res) {
              if (res.errcode !== 0) {
                  toaster.error({title:"",body:res.errmsg});
                  return;
              }
              console.log(res);
              toaster.success({title:"",body:"拨款成功"});
              $modalInstance.close();
          })
      }
  }
  $scope.cancel = function(){
      $modalInstance.close();
  }

};